<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\Breadcrumbs;

/* @var $this yii\web\View */
/* @var $model app\models\ExcelPd */
$title = ($model->pt_diagnose == 'pdf') ? 'PD复诊' : strtoupper($model->pt_diagnose);

$this->title = '查看'.$title.'表格详细信息';
$this->params['breadcrumbs'][] = ['label' => '临床信息', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => '门诊表格', 'url' => ['/clinical/excel']];
$this->params['breadcrumbs'][] = $this->title;

?>

<?= Breadcrumbs::widget([
  'homeLink' => ['label' => '医疗管理系统', 'url' => '#'],
  'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>

<div class="excel-pd-view">

    <p>
        <?= Html::a('修改', ['update', 'id' => $model->pk_id, 'type' => $model->pt_diagnose], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('返回', '/clinical/excel', ['class' => 'btn btn-success']) ?>

        <?= Html::a('删除', ['delete', 'id' => $model->pk_id, 'type' => $model->pt_diagnose], [
            'class' => 'btn btn-danger btn-right',
            'data' => [
                'confirm' => '确定删除 '.Yii::$app->session->get("pt_name").' 的 '.$title.'表格?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <table class="table table-striped table-bordered detail-view">

        <?= $this->render('@app/modules/clinical/views/excel/view_'.$model->pt_diagnose.'.php', [
          'model' => isset($model) ? $model : '',
          'rel' => isset($pt_rel_list) ? $pt_rel_list : '',
        ]) ?>
    </table>

</div>
